feat: complete journal integration into node#153
Draft
Fraser999 wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c79164a to
8cfafdd
Compare
e485653 to
3adfca6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Completes journal-based sync by adding a
journalsstrategy to the node: instead of executing host blocks, a syncing node subscribes to upstream journal WebSocket sources, applies the pre-computed state diffs to storage, and hands off to live block execution once it catches up to the host tip. Builds on the in-process journal chain andJournalHashespersistence from the downstack commits.Changes
SyncStrategy(blocksdefault,journals) and journal-sync settings toJournalConfig: upstream source URLs and client stall-timeout/backoff, withSIGNET_JOURNAL_*env vars, cross-fieldvalidate(), and startup misconfiguration warnings.journal_syncmodule.JournalIngestorapplies journal-chain events to hot/cold storage - journal application and reorg unwind - and broadcastsnewHeads/reorg notifications to RPC subscribers.runtimeowns client/ingestor setup and lifecycle, the run-loop, journal-client construction, and checkpoint seeding from theJournalHashestable so a restarted node resumes from its storage tip rather than re-bootstrapping from genesis.run_journal_syncspawns the journal client and ingestor alongside the chain, applies journals until the rollup tip is within a margin of the host tip, then hands off torun_block_syncfor live execution. Block sync is extracted into its own method and gains a cancellation path; a new cancellation token drives graceful shutdown.HostNotifierwithhost_tip()(used to decide when the node has caught up) andbackpressures_host()(defaultfalse; the reth ExEx returnstrue); implement both for the reth and RPC backends.with_cancellation_tokenonSignetNodeBuilder.Notes
journalsstrategy assumes the host (reth) is already at tip when the ExEx is enabled. During reth's own pipeline backfill an un-draining ExEx stalls the host; drain-and-discard mitigates this, and operationally the ExEx is enabled only after reth syncs (SIGNET_DISABLE_EXEX).signet-exexmust add.with_cancellation_token(...)when bumping to this version.🤖 Generated with Claude Code